<!DOCTYPE HTML>
<html xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<link rel="stylesheet" href="../css/currency/bootstrap.css" />
	<link href="../css/H-ui.min.css" rel="stylesheet" type="text/css" />
	<link href="../css/H-ui.admin.css" rel="stylesheet" type="text/css" />
	<link href="../css/style.css" rel="stylesheet" type="text/css" />
	<link href="../lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="../css/recipe.css" />
	<style>.exp{ float:left; width:300px;}</style>
	<title>位置管理</title>
	</head>
	<body>
	<nav class="breadcrumb" style="margin-bottom:0px"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 基础功能 <span class="c-gray en">&gt;</span>位置管理列表
		<a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
	</nav>
    <div class="pd-20" id="postion">
        <div class="text-c" id="postionList">
            <form search-form>
                <!-- TODO 根据业务需要修改搜索内容-->
                <input type="text" class="input-text" id="keyword" style="width:260px" placeholder="公司名称/位置编号/手机号/员工号/地址" v-model="condition.key">
				<input id="hiddenText" type="text" style="display:none" class="input-text">
				<span class="select-box" style="width:150px;">
                    <select id="status" class="select" v-model="condition.status">
                        <option value="">-请选择状态-</option>
                        <option value="1">有效</option>
                        <option value="0">无效</option>
                    </select>
                </span>
				<span class="select-box" style="width:110px;">
                    <select id="province" class="select" v-model="condition.province" @change="setCitys">
                        <option value="">-请选择省份-</option>
						<option v-for="p in condition.provinces" :value="p">{{p.name}}</option>
                    </select>
                </span>
				<span class="select-box" style="width:110px;">
                    <select id="city" class="select" v-model="condition.city" @change="setAreas">
                        <option value="">-请选择市-</option>
						<option v-for="p in condition.citys" :value="p">{{p.name}}</option>
                    </select>
                </span>
				<span class="select-box" style="width:120px;">
                    <select id="area" class="select" v-model="condition.area">
                        <option value="">-请选择区/县-</option>
						<option v-for="p in condition.areas" :value="p">{{p.name}}</option>
                    </select>
                </span>
                <div id="selectBtnEnter" class="btn btn-primary" v-on:click="getList('search');getStatusByCondition()">查询</div>
				<span>
					<a class="btn btn-primary radius addFormula" id="export" v-on:click="exportPostion()">导出{{pageInfo.total}}条数据</a>
	            </span>
			</form>
	        <div class="cl pd-5 bg-1 bk-gray mt-20">
	            <span class="l mr-5">
	                <a class="btn btn-primary radius addFormula" id="addButton" v-on:click="importPostion">导入</a>
	            </span>
				<span class="l mr-5">
	                <a class="btn btn-primary radius addFormula" id="toNoBtn" v-on:click="updateStatus('0')">失效</a>
	            </span>
				<span class="l mr-5">
	                <a class="btn btn-primary radius addFormula" id="toYesBtn" v-on:click="updateStatus('1')">生效</a>
	            </span>
				<span class="l">
					<a class="btn btn-primary radius addFormula" id="addPhoto" v-on:click="addOrUpdatePanelPicture('add')">上传图片</a>
	            </span>
	            <span class="r" v-cloak>
	            	共有数据：{{pageInfo.total}}条
	            </span>
	        </div>
			<div class="exp">
					<span>位置统计>></span>
					<span>有效:</span>
					<span>{{condition.statusOk}}</span>
					<span>无效:</span>
					<span>{{condition.statusNo}}</span>
					<span>有效率:</span>
					<span>{{condition.Percentage}}%</span>
			</div>
	        <form>
	            <table class="table table-border table-bordered table-bg">
	                <thead>
	                <tr class="text-c">
	                <!--TODO 生成表头-->
						<td><input type="checkbox" id="all" value="全选" v-model="condition.all" @click="checkAll"></td>
						<th nowrap="nowrap" width='9.091%'>位置编号</th>
						<th nowrap="nowrap" width='9.091%'>店铺编号</th>
						<th nowrap="nowrap" width='9.091%'>公司名称 </th>
						<th nowrap="nowrap" width='9.091%'>店铺名称 </th>
						<th nowrap="nowrap">店铺开门时间</th>
						<th nowrap="nowrap">店铺打烊时间</th>
						<th nowrap="nowrap">区域类型</th>
						<th nowrap="nowrap">消费等级</th>
						<th nowrap="nowrap">流量等级</th>
						<th nowrap="nowrap">结算方式</th>
						<th nowrap="nowrap" width='9.091%'>店铺联系人</th>
						<th nowrap="nowrap" width='9.091%'>店铺联系方式</th>
						<th nowrap="nowrap" width='9.091%'>维护人员工号</th>
						<th nowrap="nowrap" width='9.091%'>省</th>
						<th nowrap="nowrap" width='9.091%'>市</th>
						<th nowrap="nowrap" width='9.091%'>区</th>
						<th nowrap="nowrap" width='9.091%'>详细地址</th>
                        <th nowrap="nowrap">GPS</th>
						<th nowrap="nowrap">百度点位</th>
						<th nowrap="nowrap" width='9.091%'>状态</th>
						<th nowrap="nowrap" width='9.091%'>修改人</th>
						<th nowrap="nowrap" width='9.091%'>修改时间</th>
						<th nowrap="nowrap" width='9.091%'>预估客流</th>
						<th nowrap="nowrap" width='9.091%'>广告机安装图片</th>
						<th nowrap="nowrap" width='9.091%'>广告机安装时间</th>
						<th nowrap="nowrap" >操作</th>
	                </tr>
	                </thead>
	                <tbody v-cloak >
	                    <tr class="text-c" v-for="(item,index) in pageInfo.list">
							<td><input type="checkbox" :value="item.id" v-model="condition.items" name="id"></td>
							<td nowrap="nowrap">{{item.postionCode}}</td>
							<td nowrap="nowrap">{{item.shopCode}}</td>
							<td nowrap="nowrap">{{item.companyName}}</td>
							<td nowrap="nowrap">{{item.shopName}}</td>
							<td nowrap="nowrap">{{item.shopOpen}}</td>
							<td nowrap="nowrap">{{item.shopClose}}</td>
							<td nowrap="nowrap">{{item.areaType}}</td>
							<td nowrap="nowrap">{{item.consume}}</td>
							<td nowrap="nowrap">{{item.flowrate}}</td>
							<td nowrap="nowrap">{{item.settlement}}</td>
							<td nowrap="nowrap">{{item.shopContacts}}</td>
							<td nowrap="nowrap">{{item.shopPhone}}</td>
							<td nowrap="nowrap">{{item.empno}}</td>
							<td nowrap="nowrap">{{item.province}}</td>
							<td nowrap="nowrap">{{item.city}}</td>
							<td nowrap="nowrap">{{item.area}}</td>
							<td nowrap="nowrap">{{item.address}}</td>
                            <td nowrap="nowrap">{{item.gps}}</td>
							<td nowrap="nowrap">{{item.baiduSpot}}</td>
							<td nowrap="nowrap">
								<span v-if="item.status==1">有效</span>
								<span v-if="item.status==0">无效</span>
							</td>
							<td nowrap="nowrap">{{item.updatedBy}}</td>
							<td nowrap="nowrap">{{item.updatedDate}}</td>
							<td nowrap="nowrap">{{item.flowRate}}</td>
							<td nowrap="nowrap">
							    <span v-if="item.installPhoto!=null">
									<a :href="item.installPhoto" target="view_window">
										<img class="logoImg amplifyImg" style="width: 30px;height: 40px;" :src="item.installPhoto">
									</a>
								</span>
							</td>
							<td nowrap="nowrap">{{item.installDate}}</td>
							<td nowrap="nowrap">
								<a class="btn btn-primary radius" @click="updateInit(index)">修改</a>
								<a class="btn btn-primary radius" @click="del(index)">刪除</a>
							</td>

	                    </tr>
	                </tbody>
	            </table>
	        </form>
        
	        <div class="pageBox" v-cloak id="pageBox" >
	        	<div class="pageInfo">显示 <span id="startRow">{{pageInfo.startRow}}</span> 到 <span id="endRow">{{pageInfo.endRow}}条</span>&nbsp;&nbsp;&nbsp;&nbsp;{{pageInfo.pages}}页&nbsp;&nbsp;&nbsp;&nbsp;共 <span id="total">{{pageInfo.total}}</span> 条
	                <select v-model="selectedPageSize" v-on:change="getList('changePageSize')">
						<option value="5">5</option>
	                    <option value="10">10</option>
	                    <option value="15">15</option>
	                    <option value="20">20</option>
	                    <option value="50">50</option>
	                </select>
	             </div>
	        	<ul class="pagination" id="pagination"></ul>
	        </div>
	        <div class="tips"  id="noData" align="center" style="display: none">
	        	无数据
	        </div>
        </div>
		<!--TODO 添加、更新弹窗-->
		<form class="form form-horizontal" id="addPanelPicture" style="display: none" enctype="multipart/form-data">
			<input name="id" v-model="field.id" type="hidden">
			<table class="table" border='0' width='100%'>
				<tr>
					<td width="30%" align="right" nowrap="nowrap"></td>
					<td width="30%" style="margin-left: 0px"></td>
					<td width="40%" ></td>
				</tr>
				<tr>
					<td  align="right" nowrap="nowrap">
						<label class="form-label" style="padding:0px">
							<span class="c-red">*</span>位置编号：
						</label>
					</td>
					<td >
						<input type="text" class="input-text radius" name="postionCode" v-model="field.postionCode" placeholder="请填写位置编号" />
					</td>
					<td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="err.positionCodeErr!=''">{{err.positionCodeErr}} </span></td>
				</tr>
				<tr >
					<td align="right" nowrap="nowrap">
						<label class="form-label" style="padding:0px">
							<span class="c-red">*</span>照片类型：
						</label>
					</td>
					<td>
						<select class="select" name="param1" v-model="field.param1" >
							<option :value="1">广告机安装照片</option>
							<option :value="2">标准外部环境照片</option>
							<option :value="3">标准截屏照片</option>
						</select>
					</td>
				</tr>
				<tr id="t11">
					<td  align="right" nowrap="nowrap">
						<label class="form-label" style="padding:0px" id="tl">广告机安装图片：</label>
					</td>
					<td>
						<input type="file" id="topImg" class="radius" multiple="multiple" name="files" />
					</td>

					<td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="err.topImgErr!=''">{{err.topImgErr}} </span></td>
				</tr>
				<tr>
					<td class="text-r" ></td>
					<td class="text-c" >
						<a class="btn btn-primary radius" id="addCancelPicture" v-on:click="resetPicture">取消</a>
						<a class="btn btn-primary radius"  id="saveDictTypePicture" v-on:click="savePicture">保存</a>
					</td>
					<td></td>
				</tr>
			</table>
		</form>
	    	<!--TODO 添加、更新弹窗-->
	        <form class="form form-horizontal" id="addPanel" style="display: none">
	        <table class="table" border='0' width='100%'>
	            <tr>
				    <td width="30%" align="right" nowrap="nowrap">
				    </td>
				    <td width="30%" style="margin-left: 0px">
				    </td>
				    <td width="40%" ></td>
				</tr>
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            位置编号：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="postionCode" v-model="postionCode" placeholder="请填写位置编号"/>
				    </td>
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="postionCodeErr!=''">{{postionCodeErr}} </span></td>
				</tr>
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            店铺编号：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="shopCode" v-model="shopCode" placeholder="请填写店铺编号"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="shopCodeErr!=''">{{shopCodeErr}} </span></td>
				</tr>
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            公司名称 ：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="companyName" v-model="companyName" placeholder="请填写公司名称 "/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="companyNameErr!=''">{{companyNameErr}} </span></td>
				</tr>
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            店铺名称 ：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="shopName" v-model="shopName" placeholder="请填写店铺名称 "/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="shopNameErr!=''">{{shopNameErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            店铺联系人：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="shopContacts" v-model="shopContacts" placeholder="请填写店铺联系人"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="shopContactsErr!=''">{{shopContactsErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            店铺联系人手机 ：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="shopPhone" v-model="shopPhone" placeholder="请填写店铺联系人手机 "/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="shopPhoneErr!=''">{{shopPhoneErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            员工号：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="empno" v-model="empno" placeholder="请填写服务人员工号（设备维护）"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="empnoErr!=''">{{empnoErr}} </span></td>
				</tr>
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            详细地址：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="address" v-model="address" placeholder="请填写详细地址"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="addressErr!=''">{{addressErr}} </span></td>
				</tr>
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            修改人：
				        </label>
				    </td>
				    <td >
				        <input type="text" class="input-text radius" name="updatedBy" v-model="updatedBy" placeholder="请填写修改人"/>
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="updatedByErr!=''">{{updatedByErr}} </span></td>
				</tr>
			    
			    <tr>
				    <td  align="right" nowrap="nowrap">
				        <label class="form-label" style="padding:0px">
				            修改时间：
				        </label>
				    </td>
				    <td >
				        <input type="text" v-model="updatedDate" id="updatedDate-d" @focus="changeTime('updatedDate-d')" onfocus="WdatePicker({skin:'default',dateFmt:'yyyy-MM-dd HH:mm:ss',maxDate:'%y-%M-%d %H:%m-%s'})" class="input-text Wdate"  placeholder="请输入修改时间">
				    </td>
				    
				    <td  ><span class="Validform_checktip Validform_wrong errorInfo" v-if="updatedDateErr!=''">{{updatedDateErr}} </span></td>
				</tr>
			    
				<tr>
					<td class="text-r" ></td>
				    <td class="text-c" >
				    	<a class="btn btn-primary radius" id="addCancel" v-on:click="reset">重置</a>
				        <a class="btn btn-primary radius"  id="saveDictType" v-on:click="save">保存</a>
				    </td>
				    <td></td>
				</tr>
	        </table>
	        </form>
		<form class="form form-horizontal" id="importPanel" style="display: none" enctype="multipart/form-data" method="post">
			<table class="table" border='0' width='100%'>
				<tr>
					<td width="20%" align="right" nowrap="nowrap">
					</td>
					<td width="40%" style="margin-left: 0px">
					</td>
					<td width="40%"></td>
				</tr>
				<tr id="t1">
					<td  align="right" nowrap="nowrap">
						<label class="form-label" style="padding:0px">
							<span class="c-red">*</span>位置数据文件：
						</label>
					</td>
					<td >
						<input type="file" class="input-text radius" name="file"  placeholder="请选择导入的数据文件"  id="file"/>
					</td>

					<td>
                        <span class="Validform_checktip Validform_wrong errorInfo" v-if="fileErr!=''">
                            {{fileErr}}
                        </span>
					</td>

				</tr>

				<tr>
					<td width="100%" class="text-r" colspan="3">
						<a class="btn btn-primary radius f-l ml-50 " style="width: 180px;" id="" v-on:click="importB">保存</a>
					</td>
				</tr>

				<tr>
					<td colspan="3">
						<div class="f-l ml-50 errMsg error-msg" style="height: 70px;width: 500px" >
						</div>
					</td>
				</tr>
			</table>
		</form>
    </div>
	</body>

</html>
<script type="text/javascript" src="../js/common/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../lib/layer/1.9.3/layer.js" ></script>
<script type="text/javascript" src="../lib/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="../lib/icheck/jquery.icheck.min.js"></script>
<script type="text/javascript" src="../lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="../lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="../js/common/H-ui.js"></script>
<script type="text/javascript" src="../js/common/H-ui.admin.js"></script>
<script type="text/javascript" src="../js/utils/utils.js"></script>
<script type="text/javascript" src="../js/currency/vue.js"></script>
<script type="text/javascript" src="../js/currency/vue-resource.min.js"></script>
<script type="text/javascript" src="../js/currency/base.js"></script>
<script type="text/javascript" src="../js/currency/jqPaginator.js"></script>
<script type="text/javascript" src="../js/postion.js"></script>
